package com.zhibang.sinocare.common.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;

@Configuration  //表示该配置类
public class SwaggerConfig {
    @Bean
    public Docket docket(){
        //创建一个对象
        Docket docket = new Docket(DocumentationType.SWAGGER_2);
        //创建Aip接口信息对象
        ApiInfo apiInfo = new ApiInfoBuilder()
                .title("Swagger[Aip接口文档]") //标题
                .description("描述文字") //描述
                .contact(new Contact("小俸","http://","2765014037@qq.com")) //联系方式
                .version("1.0") //版本号
                .build();
        //指定docker的ApiInfo
        docket.apiInfo(apiInfo);
        return docket;
    }



}
